package com.rightsidetech.http.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;

/**
 * @author yinj
 * @date 2021-10-22 10:53:59
 */
@Slf4j
@Configuration
@Data
public class WechatConfig implements Serializable {

    @Value("${wechat.config.appId}")
    private String appId;

    @Value("${wechat.config.secret}")
    private String secret;


    @Value("${wechat.config.refundCertPath}")
    private String refundCertPath;

    @Value("${wechat.config.createIp}")
    private String createIp;

    @Value("${wechat.config.wechatNotifyUrl}")
    private String wechatNotifyUrl;

    @Value("${wechat.config.title}")
    private String title;

    @Value("${wechat.config.wechatAppId}")
    private String wechatAppId;

//
//    @Value("${wechat.config.wechatSecret}")
//    private String wechatSecret;
//
    @Value("${wechat.config.mchId}")
    private String mchId;

    @Value("${wechat.config.apiKey}")
    private String apiKey;
//
//
    //退款url
    public static String REFUND_URL = "https://api.mch.weixin.qq.com/secapi/pay/refund";
//    //预支付url
    public static String APP_PAY_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
//    //查询订单
//    public static String ORDER_QUERY="https://api.mch.weixin.qq.com/pay/orderquery";
    //微信转账url
    public static String TRANSFER_ACCOUNTS="https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers";
    //查询企业付款状态
    public static String GET_TRANSFER_INFO="https://api.mch.weixin.qq.com/mmpaymkttransfers/gettransferinfo";

    //获取access_token
    public static String GET_ACCESS_TOKEN = "https://api.weixin.qq.com/cgi-bin/token?";
    //小程序发送订阅消息
    public static String GET_SEND_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN";
}
